import ARCHIVE_TYPE_IMAGE from '/@/assets/image/icon/archive-type-image.png';
import ARCHIVE_TYPE_DOC from '/@/assets/image/icon/archive-type-doc.png';
import ARCHIVE_TYPE_PDF from '/@/assets/image/icon/archive-type-pdf.png';
import ARCHIVE_TYPE_PPT from '/@/assets/image/icon/archive-type-ppt.png';
import ARCHIVE_TYPE_XLS from '/@/assets/image/icon/archive-type-xls.png';

/**
 * 应用版本
 */
enum APP_EDITION {
  default = 'xx市人民医院',
  hgy = '慧管用',
  'jinhua-police-service' = '掌上运维管理',
  'can-nang-third-hospital' = '苍南第三人民医院',
}

/**
 * 应用角色版本
 */
const APP_ROLE_PLATFORM = {
  2: '后勤版',
  3: '员工版',
};

/**
 * 文件类型 1图片 2音频 3视频 4文档
 */
const FILE_TYPE = {
  1: '图片',
  2: '音频',
  3: '视频',
  4: '文档',
};

/**
 * 告警解决状态
 * - 1-未处理
 * - 2-已处理
 */
const ALARM_RESOLVE_STATE = {
  1: '未处理',
  2: '已处理',
};

/**
 * 处理方式
 * - 1-转工单
 * - 2-误报消除
 * - 3-已解决
 * - 4-忽略
 * - 5-测试
 */
const ALARM_DEAL_TYPE = {
  1: '转工单',
  2: '误报消除',
  3: '已解决',
  4: '忽略',
  5: '测试',
};

/**
 * 资产状态(基础状态)
 */
const ASSET_STATUS = {
  2: '在用',
  3: '领用',
  4: '借用',
  5: '故障',
  6: '闲置',
  7: '处置',
};

/**
 * 资产状态颜色(基础状态)
 */
const ASSET_STATUS_COLOR = {
  2: '#23cb90',
  3: '#5e9af7',
  4: '#5e9af7',
  5: '#ffa70d',
  6: '#9e9e9e',
  7: '#9e9e9e',
};

const ASSET_STATUS_BG_COLOR = {
  2: '#26ee4e36',
  3: '#26ee4e36',
  4: '#26ee4e36',
  5: '#ed4e3626',
  6: '#26ee4e36',
  7: '#26ee4e36',
};

/**
 * 工单状态
 */
const WORK_ORDER_STATUS = {
  task_draft: '未发布',
  task_assign: '待指派',
  task_receive: '待接单',
  task_process: '处理中',
  task_review: '待审核',
  task_complete: '已完成',
  task_suspend_review: '待审批',
  task_suspend: '挂起',
  task_cancel: '已撤销',
};

/**
 * 工单状态颜色
 */
const WORK_ORDER_STATUS_COLOR = {
  task_draft: '#fe963f',
  task_assign: '#fe963f',
  task_receive: '#fe963f',
  task_process: '#5077d8',
  task_review: '#fe963f',
  task_complete: '#1abe96',
  task_suspend_review: '#fe963f',
  task_suspend: '#fe963f',
  task_cancel: '#ee4e36',
};

/**
 * 工单背景颜色
 */
const WORK_ORDER_STATUS_BG_COLOR = {
  task_draft: '#ffeecd',
  task_assign: '#ffeecd',
  task_receive: '#ffeecd',
  task_process: '#e9eefd',
  task_review: '#ffeecd',
  task_complete: '#ddf5ef',
  task_suspend_review: '#ffeecd',
  task_suspend: '#ffeecd',
  task_cancel: '#fce5e1',
};

/**
 * 资产变动借用状态
 */
const ASSET_CHANGE_BORROW_STATUS = {
  1: '待审批',
  2: '未通过',
  3: '未归还',
  4: '已归还',
};
/**
 * 资产变动领用状态
 */
const ASSET_CHANGE_RECEIVE_STATUS = ASSET_CHANGE_BORROW_STATUS;
/**
 * 资产变动调拨状态
 */
const ASSET_CHANGE_ALLOCATION_STATUS = {
  1: '待审批',
  2: '未通过',
  3: '待签收',
  4: '已签收',
};

/**
 * 资产变动处置状态
 */
const ASSET_CHANGE_HANDLE_STATUS = {
  1: '待审批',
  2: '未通过',
  3: '已处置',
};

/**
 * 资产变动变更状态
 */
const ASSET_CHANGE_ALTER_STATUS = {
  1: '待审批',
  2: '未通过',
  3: '已变更',
};

/**
 * 资产变动变更状态
 */
const ASSET_CHANGE_ALTER_TYPE = { 2: '在用', 5: '故障', 6: '闲置' };

/**
 * 资产变动借用状态字体颜色
 */
const ASSET_CHANGE_BORROW_STATUS_COLOR = {
  1: '#fe963f',
  2: '#ee4e36',
  3: '#5077d8',
  4: '#1abe96',
};
/**
 * 资产变动领用状态字体颜色
 */
const ASSET_CHANGE_RECEIVE_STATUS_COLOR = ASSET_CHANGE_BORROW_STATUS_COLOR;
/**
 * 资产变动调拨状态字体颜色
 */
const ASSET_CHANGE_ALLOCATION_STATUS_COLOR = ASSET_CHANGE_BORROW_STATUS_COLOR;
/**
 * 资产变动处置状态字体颜色
 */
const ASSET_CHANGE_HANDLE_STATUS_COLOR = {
  1: '#fe963f',
  2: '#ee4e36',
  3: '#1abe96',
};

/**
 * 资产变动变更状态字体颜色
 */
const ASSET_CHANGE_ALTER_STATUS_COLOR = ASSET_CHANGE_HANDLE_STATUS_COLOR;

/**
 * 资产变动借用状态字体颜色
 */
const ASSET_CHANGE_BORROW_STATUS_BG_COLOR = {
  1: '#ffeecd',
  2: '#fce5e1',
  3: '#e9eefd',
  4: '#ddf5ef',
};
/**
 * 资产变动领用状态背景颜色
 */
const ASSET_CHANGE_RECEIVE_STATUS_BG_COLOR = ASSET_CHANGE_BORROW_STATUS_BG_COLOR;
/**
 * 资产变动调拨状态背景颜色
 */
const ASSET_CHANGE_ALLOCATION_STATUS_BG_COLOR = ASSET_CHANGE_BORROW_STATUS_BG_COLOR;
/**
 * 资产变动处置状态背景颜色
 */
const ASSET_CHANGE_HANDLE_STATUS_BG_COLOR = {
  1: '#ffeecd',
  2: '#fce5e1',
  3: '#ddf5ef',
};

/**
 * 资产变动变更状态背景颜色
 */
const ASSET_CHANGE_ALTER_STATUS_BG_COLOR = ASSET_CHANGE_HANDLE_STATUS_BG_COLOR;

/**
 * 计划任务处理状态
 */
const PLAN_TASK_STATUS = {
  1: '正常', //正常
  2: '异常', //异常
};

/**
 * 计划任务处理状态颜色
 */
const PLAN_TASK_STATUS_COLOR = {
  1: '#1ABE96', //正常
  2: '#EE4E36', //异常
};

/**
 * 计划任务处理状态背景颜色
 */
const PLAN_TASK_STATUS_BG_COLOR = {
  1: 'rgba(26,190,150,0.15)', //正常
  2: 'rgba(238,78,54,0.12)', //异常
};

/**
 * 车辆状态：1审核中，2已通过，3已拒绝
 */
const PARK_CAR_STATUS = {
  1: '审核中',
  2: '已通过',
  3: '已拒绝',
};

const PARK_CAR_STATUS_COLOR = {
  1: '#FE963F',
  2: '#1ABE96',
  3: '#DE3333',
};

const PARK_CAR_STATUS_BG_COLOR = {
  1: '#FFEECD',
  2: '#1abe9626',
  3: '#DE333326',
};
/**
 * 访客邀约审批状态
 */
const VISITOR_APPOINTMENT_AUDIT_STATUS = {
  1: '已通过',
  2: '已拒绝',
  3: '审批中',
  4: '已撤销',
  5: '已取消',
};

const VISITOR_APPOINTMENT_AUDIT_STATUS_COLOR = {
  1: '#1abe96',
  2: '#ee4e36',
  3: '#fe963f',
  4: '#aaa',
  5: '#aaa',
};

const VISITOR_APPOINTMENT_AUDIT_STATUS_BG_COLOR = {
  1: '#ddf5ef',
  2: '#fce5e1',
  3: '#ffeecd',
  4: '#eee',
  5: '#eee',
};

//状态（1-审批中，2-已通过，3-已拒绝，4-已撤销）
const APPROVE_STATUE = {
  1: '审批中',
  2: '已同意',
  3: '已拒绝',
  4: '已撤销',
};

const APPROVE_STATUE_COLOR = {
  1: '#fe963f',
  2: '#1abe96',
  3: '#ee4e36',
  4: '#aaa',
};

const APPROVE_STATUE_BG_COLOR = {
  1: '#ffeecd',
  2: '#ddf5ef',
  3: '#fce5e1',
  4: '#eee',
};

/**
 * 运送工单状态
 * task_draft-未发布，
 * task_assign-待指派，
 * task_receive-待接单，
 * task_start-待开始，
 * task_end-待结束，
 * task_confirm-待确认，
 * task_complete-已完成，
 * task_cancel-已撤销
 */
const DELIVER_ORDER_STATUS = {
  deliver_task_draft: '未发布',
  deliver_task_assign: '待指派',
  deliver_task_receive: '待接单',
  deliver_task_start: '待开始',
  deliver_task_end: '待结束',
  deliver_task_confirm: '待确认',
  deliver_task_complete: '已完成',
  deliver_task_cancel: '已撤销',
};

/**
 * 运送工单状态颜色
 */
const DELIVER_ORDER_STATUS_COLOR = {
  deliver_task_draft: '#fe963f',
  deliver_task_assign: '#fe963f',
  deliver_task_receive: '#fe963f',
  deliver_task_start: '#5077d8',
  deliver_task_end: '#5077d8',
  deliver_task_confirm: '#5077d8',
  deliver_task_complete: '#1abe96',
  deliver_task_cancel: '#ee4e36',
};

/**
 * 运送工单背景颜色
 */
const DELIVER_ORDER_STATUS_BG_COLOR = {
  deliver_task_draft: '#ffeecd',
  deliver_task_assign: '#ffeecd',
  deliver_task_receive: '#ffeecd',
  deliver_task_start: '#e9eefd',
  deliver_task_end: '#e9eefd',
  deliver_task_confirm: '#e9eefd',
  deliver_task_complete: '#ddf5ef',
  deliver_task_cancel: '#fce5e1',
};

/**
 * 文件类型 1.docx 2.doc 3xlsx 4.xls 5.pptx 6.ppt 7.pdf 8.jpg 9.png
 */
const ARCHIVE_FILE_TYPE = {
  1: ARCHIVE_TYPE_DOC,
  2: ARCHIVE_TYPE_DOC,
  3: ARCHIVE_TYPE_XLS,
  4: ARCHIVE_TYPE_XLS,
  5: ARCHIVE_TYPE_PPT,
  6: ARCHIVE_TYPE_PPT,
  7: ARCHIVE_TYPE_PDF,
  8: ARCHIVE_TYPE_IMAGE,
  9: ARCHIVE_TYPE_IMAGE,
};

const ARCHIVE_FILE_TYPE_BY_SUFFIX = {
  '.docx': 1,
  '.doc': 2,
  '.xlsx': 3,
  '.xls': 4,
  '.pptx': 5,
  '.ppt': 6,
  '.pdf': 7,
  '.jpg': 8,
  '.png': 9,
};
//用车审批
const CAR_APPROVE_TEMPLATE_CODE = '74719954-f360-4ef9-bf34-b49507fa70e6';
//库房审批
const STORE_ROOM_APPROVE_TEMPLATE_CODE = 'a4a3dfda-32eb-4dec-b3be-5a337289afe0';

export {
  APP_EDITION,
  APP_ROLE_PLATFORM,
  FILE_TYPE,
  ALARM_RESOLVE_STATE,
  ALARM_DEAL_TYPE,
  ASSET_STATUS,
  ASSET_STATUS_COLOR,
  ASSET_STATUS_BG_COLOR,
  WORK_ORDER_STATUS,
  WORK_ORDER_STATUS_COLOR,
  WORK_ORDER_STATUS_BG_COLOR,
  ASSET_CHANGE_BORROW_STATUS,
  ASSET_CHANGE_BORROW_STATUS_COLOR,
  ASSET_CHANGE_BORROW_STATUS_BG_COLOR,
  ASSET_CHANGE_RECEIVE_STATUS,
  ASSET_CHANGE_RECEIVE_STATUS_COLOR,
  ASSET_CHANGE_RECEIVE_STATUS_BG_COLOR,
  ASSET_CHANGE_ALLOCATION_STATUS,
  ASSET_CHANGE_ALLOCATION_STATUS_COLOR,
  ASSET_CHANGE_ALLOCATION_STATUS_BG_COLOR,
  ASSET_CHANGE_HANDLE_STATUS,
  ASSET_CHANGE_HANDLE_STATUS_COLOR,
  ASSET_CHANGE_HANDLE_STATUS_BG_COLOR,
  ASSET_CHANGE_ALTER_TYPE,
  ASSET_CHANGE_ALTER_STATUS,
  ASSET_CHANGE_ALTER_STATUS_COLOR,
  ASSET_CHANGE_ALTER_STATUS_BG_COLOR,
  PLAN_TASK_STATUS,
  PLAN_TASK_STATUS_COLOR,
  PLAN_TASK_STATUS_BG_COLOR,
  PARK_CAR_STATUS,
  PARK_CAR_STATUS_COLOR,
  PARK_CAR_STATUS_BG_COLOR,
  VISITOR_APPOINTMENT_AUDIT_STATUS,
  VISITOR_APPOINTMENT_AUDIT_STATUS_COLOR,
  VISITOR_APPOINTMENT_AUDIT_STATUS_BG_COLOR,
  APPROVE_STATUE,
  APPROVE_STATUE_COLOR,
  APPROVE_STATUE_BG_COLOR,
  DELIVER_ORDER_STATUS,
  DELIVER_ORDER_STATUS_COLOR,
  DELIVER_ORDER_STATUS_BG_COLOR,
  ARCHIVE_FILE_TYPE,
  ARCHIVE_FILE_TYPE_BY_SUFFIX,
  CAR_APPROVE_TEMPLATE_CODE,
  STORE_ROOM_APPROVE_TEMPLATE_CODE,
};
